<template>
	<view class="yuyueinfo">
		<headertop title="详情" str1="oridei" :back1="back1"></headertop>
		<view class="topimage">
		</view>
		<view class="weinisiyingdi">
			<view class="linebox" @click="open">
				<template v-if="dzobj||query.emstype==2">
					<view class="title" style="display:flex;align-items: center;">
						{{query.emstype==1?dzobj.name:mdobj.title}}
						<image v-if="query.emstype==2" style="width: 36rpx;height: 36rpx;" src="/static/yjt.png"
							mode="" />

						<span style="color:#4E5969;font-size:28rpx;margin-left: 24rpx;"
							v-if="query.emstype==1">{{dzobj.phone}}</span>
					</view>
				</template>
				<view class="title" style="display:flex;align-items: center;" v-if="!dzobj&&query.emstype==1">
					添加地址
					<image style="width: 36rpx;height: 36rpx;" src="/static/yjt.png" mode="" />
				</view>

				<view class="swithbox">
					<view :class="query.emstype==1?'itembox active':'itembox'" @click.stop="query.emstype=1">
						快递
					</view>
					<view :class="query.emstype==2?'itembox active':'itembox'" @click.stop="query.emstype=2">
						自提
					</view>
				</view>
			</view>
			<template v-if="dzobj||query.emstype==2">
				<view class="addresstext">
					{{query.emstype==1?dzobj.address:mdobj.address}}
					<image v-if="query.emstype==1" @click="godz" style="width: 36rpx;height: 36rpx;"
						src="/static/yjt.png" mode="">
					</image>
				</view>
			</template>

		</view>
		<view class="infobox" v-if="typestr!='gouwuche'">
			<image :src="contentobj.image" class="leftimg" mode=""></image>
			<view class="texts">
				<view class="t1">
					<view class="title">
						{{contentobj.title}}
					</view>
				</view>
				<view class="t2">
					<span
						style="font-weight: bold;font-size: 32rpx;color: #7EBC79;">￥{{!userobj.level?contentobj.price:contentobj.userprice}}</span>
					/份
				</view>
				<view class="t3line">
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11215@2x.png" @click="jj"
						mode=""></image>
					<span>{{num}}</span>
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11214@2x.png" @click="num++"
						mode=""></image>
				</view>

			</view>
		</view>
		<view class="infobox" v-else v-for="item in shangparr" :key="item.id">
			<image :src="item.goods.image" class="leftimg" mode="">
			</image>
			<view class="texts">
				<view class="t1">
					<view class="title">
						{{item.goods.title}}
					</view>
				</view>
				<view class="t2">
					<span
						style="font-weight: bold;font-size: 32rpx;color: #7EBC79;">￥{{!userobj.level?item.goods.price:item.goods.userprice}}</span>
					/份
				</view>
				<view class="t3line">
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11215@2x.png"
						@click="jj(item.num)" mode="">
					</image>
					<span>{{item.num}}</span>
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11214@2x.png"
						@click="item.num++" mode=""></image>
				</view>

			</view>
		</view>
		<view class="yuyuebox">
			<view class="center">
				<view class="title">
					<view class="leftbox">

					</view>
					<view class="tt">
						联系人信息
					</view>
				</view>
				<view class="linebox">
					<view class="labletitle">
						<span style=" color: #ff0000">*</span>联系人:
					</view>
					<view class="righttitle">
						<input type="text" v-model="query.username" placeholder="请输入联系人姓名 (必填)" />
					</view>
				</view>
				<view class="linebox">
					<view class="labletitle">
						<span style=" color: #ff0000">*</span>联系方式:
					</view>
					<view class="righttitle">
						<input type="text" v-model="query.telphone" placeholder="请输入手机号码 (必填)" />
					</view>
				</view>
				<view class="linebox">
					<view class="labletitle">
						备注:
					</view>
					<view class="righttitle">
						<input type="text" v-model="query.memo" placeholder="请输入备注" />
					</view>
				</view>
			</view>
		</view>
		<view class="yuyuebox">
			<view class="center">
				<view class="title">
					<view class="leftbox">

					</view>
					<view class="tt">
						服务信息
					</view>
				</view>
				<view class="linebox" @click="show1=true">
					<view class="labletitle">
						服务类型:
					</view>
					<view class="righttitle">
						{{ydtypearr[query.ydtype-1]['name']}}
					</view>
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Frame@2x(46).png" class="bianji"
						mode=""></image>
				</view>
				<view class="linebox">
					<view class="labletitle">
						营位信息:
					</view>
					<view class="righttitle" v-if="ydtypearr[query.ydtype-1]['name']=='预订'" @click="ff">
						{{query.campfile||'无'}}
					</view>
					<view class="righttitle" v-else>
						<input type="text" placeholder="请输入营位信息" v-model="query.campfile" />
					</view>
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Frame@2x(46).png" class="bianji"
						mode="" v-if="arrcampfile.length>1&&ydtypearr[query.ydtype-1]['name']=='预订'" @click="ff">
					</image>
				</view>
			</view>
		</view>
		<view class="yuyuebox">
			<view class="center">
				<view class="title">
					<view class="leftbox">

					</view>
					<view class="tt">
						支付方式
					</view>
				</view>
				<view class="linebox1" @click="active=0">
					<view class="lefttext">
						<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11200@2x.png"
							class="iconsmall" mode="">
						</image>
						<span>微信支付</span>
					</view>
					<image
						:src="active==0?'https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11457@2x.png':'https://39gongli.oss-cn-beijing.aliyuncs.com/static/Ellipse 2638@2x.png'"
						class="xz" mode=""></image>
				</view>
				<view class="linebox1" @click="active=1">
					<view class="lefttext">
						<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11428@2x.png"
							class="iconsmall" mode="">
						</image>
						<span>余额支付（可用￥{{yueobj.money||0}}）</span>
					</view>
					<view class="right">
						<span style="margin-right:18rpx ;"
							v-if="typestr!='gouwche'">{{(contentobj.price*num)>yueobj.money?'余额不足':''}}</span>
						<span style="margin-right:18rpx ;" v-if="typestr=='gouwche'">{{zongjia?'余额不足':''}}</span>
						<image
							:src="active==1?'https://39gongli.oss-cn-beijing.aliyuncs.com/static/Group 11457@2x.png':'https://39gongli.oss-cn-beijing.aliyuncs.com/static/Ellipse 2638@2x.png'"
							class="xz" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		<view class="jge" style="height: 190rpx;">
			<up-popup :show="show" mode="center">
				<view class="popucenter">
					<image src="https://39gongli.oss-cn-beijing.aliyuncs.com/static/图层_10@2x.png" class="popucenterimg"
						mode=""></image>
					<view class="title">
						支付成功！
					</view>
					<view class="text">
						您的商品已成功支付！
					</view>
					<view class="text">
						感谢您的购买。
					</view>
					<view class="btn" @click="gopage()">
						返回首页
					</view>
					<view class="lookorder" @click="lookorder">
						查看订单
					</view>
				</view>
			</up-popup>
		</view>

		<up-popup :show="show1" mode="bottom">
			<view class="xuanxiang" @click="show1=false">
				<view class="tt" style="margin-left: 30rpx;color: #888;">
					取消
				</view>
				<view class="tt" style="font-weight: 600;">
					请选择服务类型
				</view>
				<view class="tt" style="margin-right: 30rpx;color: #0077BE;" @click="queding">
					确认
				</view>
			</view>
			<picker-view :indicator-style="indicatorStyle" @change="bindChange" class="picker-view">
				<picker-view-column>
					<view class="item" v-for="(item,index) in ydtypearr" :key="index">{{item.name}}</view>
				</picker-view-column>
			</picker-view>
		</up-popup>

		<up-popup :show="show2" mode="bottom">
			<view class="xuanxiang" @click="show2=false">
				<view class="tt" style="margin-left: 30rpx;color: #888;">
					取消
				</view>
				<view class="tt" style="font-weight: 600;">
					请选择营位
				</view>
				<view class="tt" style="margin-right: 30rpx;color: #0077BE;" @click="queding1">
					确认
				</view>
			</view>
			<picker-view :indicator-style="indicatorStyle" @change="bindChange1" class="picker-view">
				<picker-view-column>
					<view class="item" v-for="(item,index) in arrcampfile" :key="index">{{item.cname}}</view>
				</picker-view-column>
			</picker-view>
		</up-popup>
		<view class="ziti">
			<up-popup :show="show3" mode="center">
				<view class="centeraddress">
					<image src="/static/Frame@2x(6).png" class="closeicon" mode="" @click="show3=false">
					</image>
					<view class="title">
						请选门店自提
					</view>
					<view class="addressboxs">
						<view :class="active3==index?'addressboxs_item backk':'addressboxs_item'"
							v-for="(item,index) in menduianarr" :key="index" @click="active3=index">
							<view class="texts">
								<view class="t1">
									{{item.title}}
								</view>
								<view class="t2">
									<image src="/static/Frame@2x(1).png" class="addressicon" mode=""></image>
									<view class="addresstt">
										{{item.address}} </br>距离：{{(item.distance).toFixed(2)}}km
									</view>
								</view>
							</view>
						</view>

					</view>
					<view class="btn" @click="xzmd()">
						确定
					</view>
				</view>
			</up-popup>
		</view>
		<sanshui-payment-password  :jiage="feiyong" :val="payFlag" :digits="6" @submit="onSubmit" @cancel="onCancel" />
		<view class="fixedbox">
			<view class="btn" @click="ljzf">
				立即支付
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onPageScroll,
		onLoad,
		onShow
	} from "@dcloudio/uni-app";
	import SanshuiPaymentPassword from '@/components/sanshui-payment-password/sanshui-payment-password.vue'
	import
	AMapWX
	from '/common/amap-wx.130.js'
	import {
		reactive,
		ref,
		computed
	} from 'vue';
	import headertop from '@/components/header.vue'
	import {
		walletlog
	} from '@/api/my.js'

	import {
		userinfo
	} from '@/api/my.js'
	const show1 = ref(false)
	const num = ref(1)
	import {
		goodsfile,
		myyingwei,
		addressfile,
		addorder,
		allshop,
	} from '@/api/commodity.js'
	const active = ref(-1)
	const childRef = ref('')
	const active3 = ref(0)
	const show3 = ref(false)
	const zongjia = computed(() => {
		var jiage = shangparr.value.reduce((e, item) => {
			return e + item.goods.price * item.num
		}, 0)
		return jiage
	})
	const feiyong = computed(() => {
		if (typestr.value == 'gouwuche') {
			var jiage = ''
			if(!userobj.level){
				jiage=contentobj.price*num.value
			}else{
				jiage=contentobj.userprice*num.value
			}
			return jiage
		} else {
			var jiage = ''
			jiage = contentobj.value.price * 1 + contentobj.value.deposit * 1
			return jiage
		}
	})
	
	const mdobj = reactive({
		title: '请选择营位',
		address: ''
	})
	const ydtypearr = ref([{
		'name': '堂食类',
		id: 2
	}, {
		'name': '营位类',
		id: 3
	}, {
		'name': '自取类',
		id: 4
	}])
	const query = reactive({
		goods: '',
		emstype: 1,
		username: '',
		telphone: '',
		memo: '',
		aid: '',
		ydtype: 1,
		campfile: '',
		sid: '',
		paytype: ''
	})
	const back1 = ref('')
	const active1 = ref(0)
	const payFlag = ref(false)
	const active2 = ref(0)
	const indicatorStyle = ref(`height: 50px;`)
	const show = ref(false)
	const yueobj = ref({})
	const userobj = ref({})
	const menduianarr = ref([])
	const typestr = ref('')
	const shangparr = ref([])
	const dzobj = ref({})
	const shopinfo = ref({})
	const payoid = ref('')
	const arrcampfile = ref([])
	const show2 = ref(false)
	const contentobj = ref({})
	onPageScroll((e) => {
		console.log(e, 'e.scrollTope.scrollTope.scrollTop');
		if (e.scrollTop > 50) {
			back1.value = '#9DCA95'
		} else {
			back1.value = ''
		}
	})

	function open() {
		if (query.emstype == 1) {
			godz()
		} else {
			show3.value = true
		}
	}
	onShow(() => {
		getdz()
		uni.getSetting({
			success: (res) => {
				if (!res.authSetting['scope.userLocation']) {
					console.log('授权位置');
					// 未授权，发起授权请求
					uni.authorize({
						scope: 'scope.userLocation',
						success: () => {
							initmendian()
						},
						fail: () => {
							uni.showModal({
								title: '提示',
								content: '需要位置权限才能使用该功能',
								showCancel: false,
								success() {
									uni.openSetting({
										success(res) {
											if (res
												.authSetting[
													'scope.userLocation'
												]) {

												initmendian()

											} else {
												uni.showToast({
													title: '位置授权失败',
													icon: 'none'
												})
											}
										}
									})
								}
							});
						}
					});
				} else {
					// 已授权，直接获取位置
					initmendian()
				}
			}
		});
	})
	onLoad((opt) => {
		typestr.value = opt.typestr
		if (typestr.value == 'gouwuche') {
			shangparr.value = uni.getStorageSync('shangparr')
			console.log(shangparr.value, 'shangparrshangparrshangparrshangparrshangparrshangparr');
		} else {
			query.lid = opt.id
			init(opt.id)
		}
		getuser()
		campfileinit()
		myyue()
	})
	async function initmendian() {


		uni.getLocation({
			type: 'gcj02',
			success: (res) => {
				var lat = res.latitude
				var lng = res.longitude
				initmendian1(lat, lng)
			},
			fail: (err) => {
				uni.showToast({
					title: '获取定位失败',
					icon: 'none'
				})
			}
		});

	}

	function onSubmit(e) {
		console.log(e, '输入密码到指定位数的时候自动触发的函数');
		payFlag.value = false
	}

	function onCancel() {
		payFlag.value = false
		console.log('关闭');
	}
	async function initmendian1(lat, lng) {
		const res = await allshop({
			lat,
			lng
		})
		if (res.data.code == 1) {
			menduianarr.value = res.data.data
		}
	}

	function ff() {
		if (arrcampfile.value.length > 1) {
			show2.value = true
		}
	}

	function xzmd() {
		mdobj.title = menduianarr.value[active3.value]['title']
		mdobj.address = menduianarr.value[active3.value]['address']
		query.sid = menduianarr.value[active3.value]['id']
		show3.value = false
	}
	async function getuser() {
		const res = await userinfo()
		if (res.data.code == 1) {
			userobj.value = res.data.data
		}
	}

	function godz() {
		uni.navigateTo({
			url: '/sub_my/my/shouhuoaddress?typestr=dz'
		})
	}

	async function myyue() {
		const res = await walletlog()
		if (res.data.code == 1) {
			yueobj.value = res.data.data
		}
	}

	function bindChange(e) {
		const val = e.detail.value
		console.log(val, 'val-----------------');
		active1.value = val[0]
	}

	function bindChange1(e) {
		const val = e.detail.value
		console.log(val, 'val-----------------');

		active2.value = arrcampfile.value[val[0]]['cname']
	}

	function jj(numm) {
		if (typestr.value == 'gouwuche') {
			if (numm.value == 1) return
			numm--
		} else {
			if (num.value == 1) return
			num.value--
		}

	}
	async function getdz(id) {
		const res = await addressfile()
		if (res.data.code == 1) {
			dzobj.value = res.data.data
		}
	}

	function queding1() {
		if (active2.value == 0) {
			active2.value = arrcampfile.value[0]['cname']
		}
		query.campfile = active2.value
		show2.value = false
	}

	function queding() {
		query.ydtype = active1.value + 1
		show1.value = false
	}
	async function ljzf() {
		payFlag.value = true
		if (query.emstype == 2) {
			if (!query.sid) {
				uni.showToast({
					title: '请选择自提地址',
					icon: 'none'
				})
				return
			}
		}
		if (query.emstype == 1) {
			if (!dzobj.value) {
				uni.showToast({
					title: '请添加地址',
					icon: 'none'
				})
				return
			}
		}
		console.log(shangparr, 'queryqueryquery');
		if (active.value == -1) {
			uni.showToast({
				title: '请选择支付方式',
				icon: 'none'
			})
			return
		}

		query.paytype = active.value + 1
		if (typestr.value == 'gouwuche') {
			var arr = []
			for (var i in shangparr.value) {
				var obj = {
					gid: shangparr.value[i]['gid'],
					num: shangparr.value[i]['num']
				}
				arr.push(obj)
			}
			query.goods = arr
		} else {
			query.goods = [{
				gid: contentobj.value.id,
				num: num.value
			}]
		}

		for (var i in query) {
			if (i != 'aid' && i != 'sid' && i != 'memo') {
				if (!query[i]) {
					uni.showToast({
						title: '请联系人信息和服务信息',
						icon: 'none'
					})
					return
				}
			}

		}
		if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(query.telphone))) { //校验手机号码是否有误
			uni.showToast({
				title: '请填写正确手机号码',
				icon: "none"
			});
			return;
		}

		if (active.value == -1) {
			uni.showToast({
				title: '请选择支付方式',
				icon: 'none'
			})
			return
		}
		payFlag.value = true
		console.log('payFlag.valuepayFlag.valuepayFlag.value');
		return

		const res = await addorder({
			goods: query.goods,
			username: query.username,
			emstype: query.emstype,
			telphone: query.telphone,
			aid: query.emstype == 1 ? dzobj.value.id : '',
			memo: query.memo,
			ydtype: query.ydtype,
			paytype: query.paytype,
			campfile: query.campfile,
			sid: query.emstype == 2 ? query.sid : '',
		})
		if (res.data.code == 1) {
			payoid.value = res.data.data.oid
			if (active.value == 0) {
				var payobj = res.data.data.pay
				uni.requestPayment({
					timeStamp: String(payobj.timestamp),
					nonceStr: payobj.noncestr,
					package: payobj.package,
					signType: 'MD5',
					paySign: payobj.sign,
					success(res) {
						show.value = true
					},
					fail(e) {
						setTimeout(() => {
							uni.showToast({
								title: '支付失败',
								icon: 'none'
							})
						}, 500)
						uni.navigateTo({
							url: '/sub_my/my/shangchengdetail?id=' + payoid.value
						})
						// console.log('支付失败--------------', e);
					}
				})
			} else {
				show.value = true
			}
		}

	}

	function lookorder() {
		uni.navigateTo({
			url: '/sub_my/my/shangchengdetail?id=' + payoid.value
		})
	}
	async function init(id) {
		const res = await goodsfile({
			id
		})
		if (res.data.code == 1) {
			contentobj.value = res.data.data
		}
	}

	async function campfileinit() {
		const res = await myyingwei()
		if (res.data.code == 1) {
			if (res.data.data.cname) {
				if (res.data.data.cname.length) {
					query.campfile = res.data.data.cname[0]['cname']
				}
				arrcampfile.value = res.data.data.cname
				if (arrcampfile.value.length) {
					ydtypearr.value = [{
						'name': '预订',
						id: 1
					}, {
						'name': '堂食类',
						id: 2
					}, {
						'name': '营位类',
						id: 3
					}, {
						'name': '自取类',
						id: 4
					}]
				} else {
					ydtypearr.value = [{
						'name': '堂食类',
						id: 2
					}, {
						'name': '营位类',
						id: 3
					}, {
						'name': '自取类',
						id: 4
					}]
				}

			}
		}
	}

	function gopage() {
		uni.switchTab({
			url: '/pages/index/index'
		})
	}
</script>

<style lang="scss">
	.backk {
		border: 2rpx solid #7EBC79;
	}


	.ziti::v-deep .u-popup__content {
		border-radius: 20rpx !important;
	}

	.centeraddress {
		width: 594rpx;
		overflow: hidden;
		height: 736rpx;
		border-radius: 20rpx !important;
		position: relative;

		.btn {
			width: 530rpx;
			height: 72rpx;
			background: #7EBC79;
			border-radius: 12rpx;
			text-align: center;
			line-height: 72rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 30rpx;
			color: #FFFFFF;
			margin: auto;
			margin-top: 34rpx;


		}

		.centeraddressimg {
			width: 594rpx;
			height: 736rpx;
			position: absolute;
			z-index: -1;
		}

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #1D2129;
			width: 100%;
			text-align: center;
			margin-top: 74rpx;
		}

		.addressboxs {
			width: 530rpx;
			margin: auto;
			height: 444rpx;
			margin-top: 24rpx;
			overflow-y: scroll;

			&_item {
				width: 525rpx;
				margin-bottom: 24rpx;
				position: relative;
				overflow: hidden;
				background: #F7F8FA;
				border-radius: 10rpx;

				.dqright {
					width: 110rpx;
					height: 36rpx;
					position: absolute;
					right: 0%;
					top: 0%;
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 20rpx;
					color: #FFFFFF;
					text-align: center;
					line-height: 36rpx;
					display: flex;
					justify-content: center;
					z-index: 999;

					image {
						width: 110rpx;
						height: 36rpx;
						z-index: -1;
						position: absolute;

					}
				}

				.texts {
					width: 482rpx;
					margin: auto;
					overflow: hidden;
					white-space: nowrap;
					/* 防止文本换行 */
					overflow: hidden;
					/* 隐藏超出容器的部分 */
					text-overflow: ellipsis;

					/* 超出部分显示为省略号 */
					.t1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 28rpx;
						color: #1D2129;
						margin-top: 24rpx;
					}

					.t2 {
						display: flex;
						width: 100%;
						margin-top: 28rpx;
						margin-bottom: 28rpx;
						align-items: center;

						.addressicon {
							width: 32rpx;
							height: 32rpx;
							margin-right: 20rpx;
						}

						.addresstt {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #86909C;
							width: 400rpx;
							white-space: normal;
							// display: -webkit-box;
							// -webkit-line-clamp: 1;
							// -webkit-box-orient: vertical;
							// overflow: hidden;
						}
					}
				}

				&_img {
					width: 530rpx;
					height: 132rpx;
					position: absolute;
					z-index: -1;
				}
			}
		}

		.closeicon {
			width: 44rpx;
			height: 44rpx;
			position: absolute;
			right: 24rpx;
			top: 24rpx;
		}
	}

	.picker-view {
		width: 750rpx;
		height: 400rpx;
		margin-top: 20rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0 0;
	}

	.item {
		line-height: 100rpx;
		text-align: center;
	}

	::v-deep .u-popup__content {
		// background-color: rgba(255, 0, 0, 0) !important;
		border-radius: 20rpx 20rpx 0 0;
	}

	.xuanxiang {
		width: 100%;
		display: flex;
		align-items: center;
		margin-top: 30rpx;
		overflow: hidden;
		justify-content: space-between;
		margin-bottom: 30rpx;

		.tt {
			font-size: 32rpx;
		}
	}

	.jge {
		::v-deep .u-popup__content {
			background-color: rgba(255, 0, 0, 0) !important;
		}
	}


	.popucenter {
		width: 592rpx;
		height: 720rpx;
		background: linear-gradient(180deg, #F4FFF5 0%, #FFFFFF 31%);
		border-radius: 28rpx 28rpx 28rpx 28rpx;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		align-items: center;

		.popucenterimg {
			width: 355.92rpx;
			height: 315.24rpx;
			margin-top: 22rpx;
		}

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #1D2129;
			margin-bottom: 24rpx;
		}

		.text {
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #4E5969;
		}

		.btn {
			width: 422rpx;
			height: 64rpx;
			background: #7EBC79;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			text-align: center;
			line-height: 64rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
			margin-top: 22rpx;
		}

		.lookorder {
			width: 422rpx;
			height: 64rpx;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			border: 2rpx solid #7EBC79;
			text-align: center;
			line-height: 64rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			margin-top: 24rpx;
			color: #7EBC79;
		}
	}

	.fixedbox {
		width: 100%;
		overflow: hidden;
		height: 184rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -4rpx 4rpx 0rpx rgba(0, 0, 0, 0.08);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: fixed;
		bottom: 0%;

		.btn {
			width: 686rpx;
			height: 88rpx;
			background: #7EBC79;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			text-align: center;
			line-height: 88rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 30rpx;
			color: #FFFFFF;
			text-align: center;
			line-height: 88rpx;
			margin: auto;
			margin-top: 22rpx;
		}
	}

	.yuyueinfo {
		width: 100%;
		overflow: hidden;
		position: relative;

		.topimage {
			width: 100%;
			height: 530rpx;
			background: linear-gradient(180deg, #84BD78 0%, rgba(132, 189, 120, 0) 100%);
			border-radius: 0rpx 0rpx 0rpx 0rpx;
			position: absolute;
			top: 0%;
			z-index: -1;
		}

		.yuyuebox {
			width: 686rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(0, 0, 0, 0.15);
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			margin: auto;
			margin-top: 32rpx;
			overflow: hidden;

			.center {
				width: 630rpx;
				margin: auto;

				.linebox1 {
					width: 100%;
					height: 84rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.xz {
						width: 32rpx;
						height: 32rpx;
					}

					.right {
						display: flex;
						font-size: 24rpx;
						color: #86909C;
						align-items: center;
					}

					.lefttext {
						display: flex;
						align-items: center;
						font-weight: 400;
						font-size: 28rpx;
						color: #1D2129;

						.iconsmall {
							width: 40rpx;
							height: 40rpx;
							margin-right: 12rpx;
						}
					}
				}

				.linebox {
					width: 100%;
					height: 84rpx;
					display: flex;
					align-items: center;
					border-bottom: 2rpx solid #F7F8FA;
					position: relative;

					.labletitle {
						width: 140rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #1D2129;
					}

					.righttitle {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #1D2129;
						position: relative;
						display: flex;
						align-items: center;
						margin-left: 20rpx;
					}

					.bianji {
						right: 0%;
						width: 32rpx;
						height: 32rpx;
						position: absolute;
					}
				}

				.title {
					width: 100%;
					display: flex;
					align-items: center;
					margin-top: 34rpx;
					margin-bottom: 20rpx;

					.leftbox {
						width: 6rpx;
						height: 36rpx;
						background: #7EBC79;
						border-radius: 0rpx 24rpx 24rpx 0rpx;
					}

					.tt {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 32rpx;
						color: #1D2129;
						margin-left: 12rpx;
					}
				}
			}
		}

		.weinisiyingdi {
			width: 686rpx;
			height: 152rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 4rpx 0rpx rgba(134, 202, 115, 0.43);
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			overflow: hidden;
			margin: auto;
			margin-top: 186rpx;

			.addresstext {
				width: 622rpx;
				margin: auto;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #4E5969;
				margin-top: 18rpx;
				display: flex;
				align-items: center;
			}

			.linebox {
				width: 622rpx;
				margin: auto;
				margin-top: 18rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.title {
					width: 392rpx;
					font-weight: bold;
					font-size: 32rpx;
					color: #1D2129;
				}

				.swithbox {
					width: 200rpx;
					height: 56rpx;
					display: flex;
					align-items: center;
					border-radius: 27rpx 27rpx 27rpx 27rpx;
					overflow: hidden;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #FFFFFF;
					background: #7EBC79;
					justify-content: space-around;

					.itembox {
						width: 96rpx;
						height: 52rpx;
						text-align: center;
						line-height: 52rpx;
						border-radius: 27rpx 27rpx 27rpx 27rpx;
					}

					.active {
						width: 96rpx;
						height: 52rpx;
						border-radius: 27rpx 27rpx 27rpx 27rpx;
						background: #fff;
						font-weight: 500;
						font-size: 28rpx;
						color: #1D2129;
						line-height: 52rpx;
						text-align: center;
					}
				}
			}
		}

		.infobox {
			width: 686rpx;
			height: 224rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 4rpx 0rpx rgba(134, 202, 115, 0.43);
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			margin: auto;
			display: flex;
			align-items: center;
			margin-top: 28rpx;

			.leftimg {
				width: 198rpx;
				height: 176rpx;
				border-radius: 20rpx 20rpx 20rpx 20rpx;
				margin-left: 24rpx;
			}

			.texts {
				width: 412rpx;
				margin-left: 24rpx;
				overflow: hidden;

				.t1 {
					width: 412rpx;
					display: flex;
					align-items: center;
					margin-top: 16rpx;

					.leftpobox {
						width: 56rpx;
						height: 40rpx;
						background: #7EBC79;
						border-radius: 4rpx 20rpx 4rpx 20rpx;
						display: flex;
						justify-content: center;
						align-items: center;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #FFFFFF;
					}

					.title {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #1D2129;
						margin-left: 8rpx;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 1;
						/* 限制行数为2 */
						overflow: hidden;
					}
				}

				.t3line {
					display: flex;
					align-items: center;
					margin-top: 28rpx;
					width: 126rpx;
					justify-content: space-between;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 28rpx;
					color: #4E5969;
					margin-left: 280rpx;

					image {
						width: 40rpx;
						height: 40rpx;
					}
				}

				.t2 {
					width: 412rpx;
					white-space: nowrap;
					overflow: hidden;
					font-weight: 400;
					font-size: 24rpx;
					color: #868686;
					margin-top: 26rpx;
					text-overflow: ellipsis;
				}
			}
		}
	}
</style>